import Cookies from 'js-cookie'

const TokenKey = 'backstage_token'

// 获取
export function getToken() {
  return Cookies.get(TokenKey)
}

// 添加
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
// 存时间戳
export function timeStampToken() {
  return Cookies.set('token_time', Date.now())
}
// 取时间
export function gettimeStamp() {
  return Cookies.get('token_time')
}
